#include <iostream>

using namespace std;

int main()
{
	cout.setf(ios::showbase);
	int a[4] = {1, 2, 3, 4};
	int *p = a;// *p = a ma a = &a[0]. p ---> &a[0] (0x0a)
	cout<<hex<<"a = "<<a<<" *a = "<<*a<<" &a = "<<&a<<endl;//a = 0x0a; *a = 1; &a = 0x0a
	cout<<hex<<"p = "<<p<<" *p = "<<*p<<" &p = "<<&p<<endl;//p = 0x0a; *p = 1; &p = 0x0p
	cout<< (a + 1) <<" "<< *(a + 1)<<" "<< *a + 1<<" "<< &a + 1<<endl;//(a + 1) = &a[1]; *(a + 1) = 2; *a + 1 = 2; &a + 1 =
	cout<< (p + 1) <<" "<< *(p + 1)<<" "<< *p + 1<<" "<< &p + 1<<endl;//(p + 1) = &a[1]; *(p + 1) = 2; *p + 1 = 2; &p + 1 =
	
	system("pause");
}